

    \filetitle{textinp2dat}{Convert text input to IRIS serial date numbers}{dates/textinp2dat}

	\paragraph{Syntax}

\begin{verbatim}
Dat = textinp2dat(Str)
\end{verbatim}

\paragraph{Input arguments}

\begin{itemize}
\tightlist
\item
  \texttt{Str} {[} char {]} - String describing a date, a vector of
  dates, or a range; see Description.
\end{itemize}

\paragraph{Output arguments}

\begin{itemize}
\tightlist
\item
  \texttt{Dat} {[} numeric {]} - IRIS serial date numbers representing
  the input date, vector of dates, or range.
\end{itemize}

\paragraph{Description}

Input text strings can contain dates in the basic format, for instance
\texttt{2010Y} for yearly dates, \texttt{2010H1} for half-yearly dates,
\texttt{2010Q2} for quarterly dates, \texttt{2010B6} for bi-monthly
dates, \texttt{2010M09} for monthly dates, \texttt{2010W52} for weekly
dates, or \texttt{2010-May-30} for daily dates. Each occurrence of a
date will be replaced with a call to the respective IRIS date function,
\texttt{yy(...)}, \texttt{hh(...)}, \texttt{qq(...)}, \texttt{bb(...)},
\texttt{mm(...)}, \texttt{ww(...)}, or \texttt{dd(...)}, and the
resulting expression will be evaluated, converting it into a vector of
IRIS serial date numbers.

\paragraph{Example}

\begin{verbatim}
>> textinp2dat('2010Q1:2011Q4')
ans =
   1.0e+03 *
    Columns 1 through 7
    8.0400    8.0410    8.0420    8.0430    8.0440    8.0450    8.0460
    Column 8
    8.0470
>> dat2str( textinp2dat('2010Q1:2011Q4') )
ans =
    Columns 1 through 6
    '2010Q1'    '2010Q2'    '2010Q3'    '2010Q4'    '2011Q1'    '2011Q2'
    Columns 7 through 8
    '2011Q3'    '2011Q4'
\end{verbatim}


